package com.alibaba.citrus.cr.sales.plan.facade.service.setting;

import com.alibaba.citrus.cr.common.annotation.FacadeInvoker;
import com.alibaba.citrus.cr.sales.plan.api.setting.MonthlyCommerceQueryService;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.pageQueryMonthlyCommerceRequest;
import com.alibaba.citrus.cr.sales.plan.repository.MonthlyCommerceRepository;
import com.alibaba.citrus.cr.sales.plan.sdo.MonthlyCommerceSDO;
import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MonthlyCommerceQueryServiceImpl implements MonthlyCommerceQueryService {


    @Resource
    private MonthlyCommerceRepository monthlyCommerceRepository;

    @Override
    @FacadeInvoker
    public Result<PageResult<List<MonthlyCommerceSDO>>> pageQueryMonthlyCommerce(
        pageQueryMonthlyCommerceRequest pageQueryMonthlyCommerceRequest) {
        PageResult<List<MonthlyCommerceSDO>> listPageResult = monthlyCommerceRepository.pageQuery(pageQueryMonthlyCommerceRequest);
        return Result.success(listPageResult);
    }
}
